<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});

Route::get('foo',function (){
    return 'hello';
});
Route::group(['namespace' => 'Resource'],function (){
    Route::post('/play/banner','ResourceController@banner');
    Route::post('/play/footertab','ResourceController@footerTab');
    Route::post('/category/list','ResourceController@supcategory');
    //admin管理后台调用
    Route::get('/city','ResourceController@city');
    Route::get('/admin_subcategory','ResourceController@admin_subcategory');
    Route::get('/admin_level','ResourceController@admin_level');

    Route::post('/quota/getMutil','ResourceController@getMutilQuota');
    Route::post('/quota/getOne','ResourceController@getQuota');
    Route::post('/category/detail','ResourceController@getSubCategoryDetail');
    Route::post('/standard/getOne','ResourceController@getStandardOne');
    Route::post('/company/list','ResourceController@companyList');
    Route::post('/consult/add','ResourceController@consultAdd');
    Route::post('/captcha/consult','ResourceController@captchaconsult');
    Route::post('/captcha/register','ResourceController@captchareg');
    Route::post('/captcha/forgetpwd','ResourceController@captchaforgetpwd');
    Route::post('/banner/list','ResourceController@banner');
    Route::post('/subcategory/quotalist','ResourceController@subcategquotalist');
    Route::post('/company/upload','ResourceController@uploadcompany');
    Route::post('/company/add','ResourceController@companyAdd');
    Route::post('/img/upload','ResourceController@imgupload');
    Route::post('/order/list','ResourceController@consultList');
    Route::post('/order/getOne','ResourceController@consultGetOne');
    Route::post('/news/index','ResourceController@newsindex');
    Route::post('/index/news','ResourceController@indexnews');
    Route::post('/news/list','ResourceController@newslist');
    Route::post('/news/getOne','ResourceController@newsdetail');
    Route::post('/news/hot','ResourceController@hotnewslist');
    Route::post('/news/rand','ResourceController@randnewslist');
    Route::post('/company/info','ResourceController@companyInfo');
//    Route::post('/dist/add','ResourceController@distAdd');
    Route::post('/staff/add','ResourceController@companyStaffAdd');
    Route::post('/staff/list','ResourceController@companyStaffList');
    Route::post('/staff/getOne','ResourceController@companyStaffGetOne');
    Route::post('/staff/del','ResourceController@companyStaffDel');
    Route::post('/case/add','ResourceController@companyCaseAdd');
    Route::post('/case/list','ResourceController@companyCaseList');
    Route::post('/case/del','ResourceController@companyCaseDel');
    Route::post('/case/getOne','ResourceController@companyCaseGetOne');
    Route::post('/voucher/list','ResourceController@voucherList');
    Route::post('/policy/list','ResourceController@policyList');
    Route::post('/user/company','ResourceController@userCompanyInfoBusi');
    Route::post('/company/getOne','ResourceController@companyDetail');
    Route::post('/company/cases','ResourceController@getCompanyCases');
    Route::post('/company/staff','ResourceController@getCompanyStaff');
    Route::post('/city/list','ResourceController@cityIds');
    Route::post('/url/list','ResourceController@thirdUrls');




});
Route::group(['namespace' => 'User'],function(){
    Route::post('/auth/register', 'AuthController@register');
    Route::post('/auth/login', 'AuthController@login');
    Route::post('/auth/forgetpwd', 'AuthController@resetPwdByphone');
    Route::post('/auth/checklogin', 'AuthController@checklogin');
    Route::post('/auth/logout', 'AuthController@logout');

});




Route::group(['namespace' => 'Auth'],function (){
    Route::get('auth/weixin', 'WeixinController@WexinLogin');
    Route::get('auth/weixin/callback', 'WeixinController@handleProviderCallback');


});

